package peace.gui.controls {
import flash.display.Sprite;

[Event(name="change", type="peace.gui.controls.SelectEvent")]
public class Control extends Sprite {
    protected var _selected:Boolean = false;

    /**
     * Переключатель активности на мышь
     */
    public function set enabled(b:Boolean):void {
        mouseEnabled = mouseChildren = focusRect = tabEnabled = tabChildren = b;
        alpha = b ? 1 : 0.3;
    }

    public function get enabled():Boolean {
        return mouseEnabled;
    }

    /**
     * virtual
     * @return текущее занчение контрола
     */
    public function get value():* {
        return null;
    }

    /**
     * virtual
     */
    public function set value(v:*):void {
    }

    /**
     * virtual <br>
     * @param b
     */
    public function set selected(b:Boolean):void {
        _selected = b;
    }

    public function get selected():Boolean {
        return _selected
    }
}
}